package org.openmore.consumer.service.feignImpl;

import feign.hystrix.FallbackFactory;
import org.openmore.consumer.dto.common.BaseResponse;
import org.openmore.consumer.dto.common.RoleDto;
import org.openmore.consumer.dto.common.StringParams;
import org.openmore.consumer.service.feign.RoleService;

import org.openmore.consumer.service.feign.AccountService;

public class RoleServiceImpl extends BaseFeignFallback implements FallbackFactory<RoleService> {
    @Override
    public RoleService create(Throwable cause) {
        return new RoleService() {
            @Override
            public BaseResponse selectAllByPage(String name, Integer pageNum, Integer pageSize) {
                return getFallBackResponse();
            }

            @Override
            public BaseResponse grantPermission(String id, StringParams param) {
                return getFallBackResponse();
            }

            @Override
            public BaseResponse getRoleById(String id) {
                return getFallBackResponse();
            }

            @Override
            public BaseResponse updateRole(RoleDto role) {
                return getFallBackResponse();
            }

            @Override
            public BaseResponse insertRole(RoleDto role) {
                return getFallBackResponse();
            }

            @Override
            public BaseResponse deleteRole(String id) {
                return getFallBackResponse();
            }
        };
    }
}
